arch ?=arm
modname ?= beeqqudong
ifeq ($(arch),arm)
	KERNELDIR := /home/linux/linux-5.10.61
else 
	KERNELDIR := /lib/modules/$(shell uname -r)/build/
endif

PWD := $(shell pwd)

all:
	make -C $(KERNELDIR) M=$(PWD) modules
install:
	make -C $(KERNELDIR) M=$(PWD) modules_install  INSTALL_MOD_PATH=/home/linux/rootfs
clean:
	make -C $(KERNELDIR) M=$(PWD) clean

obj-m := $(modname).o    